package com.ruoyi.piliangruku.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.piliangruku.mapper.PiliangRukuMapper;
import com.ruoyi.piliangruku.domain.PiliangRuku;
import com.ruoyi.piliangruku.service.IPiliangRukuService;

/**
 * 批量入库Service业务层处理
 *
 * @author ruoyi
 * @date 2023-05-19
 */
@Service
public class PiliangRukuServiceImpl implements IPiliangRukuService
{
    @Autowired
    private PiliangRukuMapper piliangRukuMapper;

    /**
     * 查询批量入库
     *
     * @param id 批量入库主键
     * @return 批量入库
     */
    @Override
    public PiliangRuku selectPiliangRukuById(Long id)
    {
        return piliangRukuMapper.selectPiliangRukuById(id);
    }

    /**
     * 查询批量入库列表
     *
     * @param piliangRuku 批量入库
     * @return 批量入库
     */
    @Override
    public List<PiliangRuku> selectPiliangRukuList(PiliangRuku piliangRuku)
    {
        return piliangRukuMapper.selectPiliangRukuList(piliangRuku);
    }

    /**
     * 新增批量入库
     *
     * @param piliangRuku 批量入库
     * @return 结果
     */
    @Override
    public int insertPiliangRuku(PiliangRuku piliangRuku)
    {
        return piliangRukuMapper.insertPiliangRuku(piliangRuku);
    }

    /**
     * 修改批量入库
     *
     * @param piliangRuku 批量入库
     * @return 结果
     */
    @Override
    public int updatePiliangRuku(PiliangRuku piliangRuku)
    {
        return piliangRukuMapper.updatePiliangRuku(piliangRuku);
    }

    /**
     * 批量删除批量入库
     *
     * @param ids 需要删除的批量入库主键
     * @return 结果
     */
    @Override
    public int deletePiliangRukuByIds(Long[] ids)
    {
        return piliangRukuMapper.deletePiliangRukuByIds(ids);
    }

    /**
     * 删除批量入库信息
     *
     * @param id 批量入库主键
     * @return 结果
     */
    @Override
    public int deletePiliangRukuById(Long id)
    {
        return piliangRukuMapper.deletePiliangRukuById(id);
    }


    @Override
    public String selectGouhuoDanhaoByLastOne()
    {
        return piliangRukuMapper.selectGouhuoDanhaoByLastOne();
    }
}
